load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
    name = "catalog",
    srcs = ["catalog_generator.go"],
    embed = [":catalog_go_proto"],
    importpath = "github.com/cockroachdb/cockroach/pkg/ts/catalog",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ts/tspb",
        "//pkg/util/metric",
        "@com_github_prometheus_client_model//go",
    ],
)

proto_library(
    name = "catalog_proto",
    srcs = ["chart_catalog.proto"],
    strip_import_prefix = "/pkg",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ts/tspb:tspb_proto",
        "@com_github_gogo_protobuf//gogoproto:gogo_proto",
        "@com_github_prometheus_client_model//io/prometheus/client:io_prometheus_client_proto",
    ],
)

go_proto_library(
    name = "catalog_go_proto",
    compilers = ["//pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_compiler"],
    importpath = "github.com/cockroachdb/cockroach/pkg/ts/catalog",
    proto = ":catalog_proto",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ts/tspb",
        "@com_github_gogo_protobuf//gogoproto",
        "@com_github_prometheus_client_model//go",
    ],
)
